
<%@ page import="projectmanager.Project" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'project.label', default: 'Project')}" />
		<title><g:message code="Project Details" /></title>
	</head>
	<body>
		<a href="#show-project" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div id="container">
		<g:render template="/layouts/sidebar"/>
		<div id="content">
		<div id="show-project" class="content scaffold-show" role="main">
			<h1><g:message code="Project Details"  /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list project">
			
				<g:if test="${projectInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="project.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${projectInstance}" field="name"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${projectInstance?.description}">
				<li class="fieldcontain">
					<span id="description-label" class="property-label"><g:message code="project.description.label" default="Description" /></span>
					
						<span class="property-value" aria-labelledby="description-label"><g:fieldValue bean="${projectInstance}" field="description"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${projectInstance?.projectManager}">
				<li class="fieldcontain">
					<span id="projectManager-label" class="property-label"><g:message code="project.projectManager.label" default="Project Manager" /></span>
					
						<span class="property-value" aria-labelledby="projectManager-label"><g:link controller="user" action="show" id="${projectInstance?.projectManager?.id}">${projectInstance?.projectManager?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				<g:if test="${projectInstance?.status}">
				<li class="fieldcontain">
					<span id="status-label" class="property-label"><g:message code="project.status.label" default="Status" /></span>
					
						<span class="property-value" aria-labelledby="status-label"><g:fieldValue bean="${projectInstance}" field="status"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${projectInstance?.startDate}">
				<li class="fieldcontain">
					<span id="startDate-label" class="property-label"><g:message code="project.startDate.label" default="Start Date" /></span>
					
						<span class="property-value" aria-labelledby="startDate-label"><g:formatDate date="${projectInstance?.startDate}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${projectInstance?.dueDate}">
				<li class="fieldcontain">
					<span id="dueDate-label" class="property-label"><g:message code="project.dueDate.label" default="Due Date" /></span>
					
						<span class="property-value" aria-labelledby="dueDate-label"><g:formatDate date="${projectInstance?.dueDate}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${projectInstance?.dateCompleted}">
				<li class="fieldcontain">
					<span id="dateCompleted-label" class="property-label"><g:message code="project.dateCompleted.label" default="Date Completed" /></span>
					
						<span class="property-value" aria-labelledby="dateCompleted-label"><g:formatDate date="${projectInstance?.dateCompleted}" /></span>
					
				</li>
				</g:if>
				
				<g:if test="${projectInstance?.teamMembers}">
				<li class="fieldcontain">
					<span id="teamMembers-label" class="property-label"><g:message code="project.teamMembers.label" default="Team Members" /></span>
					
						<g:each in="${projectInstance.teamMembers}" var="t">
						<span class="property-value" aria-labelledby="teamMembers-label"><g:link controller="membership" action="show" id="${t.id}">${t?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${projectInstance?.risks}">
				<li class="fieldcontain">
					<span id="risks-label" class="property-label"><g:message code="project.risks.label" default="Risks" /></span>
					
						<g:each in="${projectInstance.risks}" var="r">
						<span class="property-value" aria-labelledby="risks-label"><g:link controller="risk" action="show" id="${r.id}">${r?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${projectInstance?.requirements}">
				<li class="fieldcontain">
					<span id="requirements-label" class="property-label"><g:message code="project.requirements.label" default="Requirements" /></span>
					
						<g:each in="${projectInstance.requirements}" var="r">
						<span class="property-value" aria-labelledby="requirements-label"><g:link controller="requirement" action="show" id="${r.id}">${r?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				
			
				
				
				<g:if test="${projectInstance?.tasks}">
				<li class="fieldcontain">
					<span id="tasks-label" class="property-label"><g:message code="project.tasks.label" default="Tasks" /></span>
					
						<g:each in="${projectInstance.tasks}" var="t">
						<span class="property-value" aria-labelledby="tasks-label"><g:link controller="task" action="list" id="${t.id}">${t?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
			</ol>
			</div></div>
				<div id=footer></div>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${projectInstance?.id}" />
					<g:link class="edit" action="edit" id="${projectInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
